import { request } from "../../utils/request";
import { ElMessage } from "element-plus";
import useUserStore from "../../store/user";
// 新增中间件
export const addMiddleWareData=async (data)=>{
  return request({
    url:'api/lab/admin/v1/middleware/save',
    method:'post',
    data
  })
}
// 请求中间件
export const reqMiddleWareData=async (current,size)=>{
  return request({
    url:'api/lab/admin/v1/middleware/query',
    method:'get',
    params:{
      current:current,
      size:size
    }
  })
}

// 查询中间件状态
export const reqMiddleWareStatus=async (mid)=>{
  return request({
    url:'api/lab/admin/v1/middleware/verify-online',
    method:'get',
    params:{
      mid:mid
    }
  })
}
export const modifyMiddleWare=async (data)=>{
  return request({
    url:'api/lab/admin/v1/middleware/update',
    method:'put',
    data
  })
}